-= (vector/collection operation)
Stack | Position | Description |
---|---|---|
Stack(In) | Top | any value x |
Top 1 | Vector | |
Stack(Out) |
Removes element x from the vector, regardless of the position of a in the original vector. Element a is removed only once, i.e. at its first occurrence in the vector. The vector remains unchanged if it does not contain a.
Stack | Position | Description |
---|---|---|
Stack(In) | Top | Vector x |
Top 1 | Vector y | |
Stack(Out) |
Removes element x from the vector, regardless of the position of a in the original vector. Element a is removed only once, i.e. at its first occurrence in the vector. The vector remains unchanged if it does not contain a.
Stack | Position | Description |
---|---|---|
Stack(In) | Top | any value x |
Top 1 | Collection | |
Stack(Out) |
Removes the element x from the collection, regardless of the position of a in the original collection. Element a is removed only once, i.e. at its first occurrence in the collection. The collection remains unchanged if it does not contain a.
Stack | Position | Description |
---|---|---|
Stack(In) | Top | Collection x |
Top 1 | Collection y | |
Stack(Out) |
Removes all elements of collection x from collection y, regardless of their position in the original collection. Each element from collection a is removed only once, i.e. at its first occurrence in the collection. The collection remains unchanged if it contains no element from a.
Code example:
// Element entfernen (Vektor/Collection) Var(v) [ 1€ 2€ 3€ ] -> v v 3€ -= // -> [ 1€ 2€ ] // Vektor aus Vektor entfernen oder Collection aus Collection entfernen Var(v) [ 1€ 2€ 3€ 4€ ] -> v v [ 1€ 3€ ] -= // -> [ 2€ 4€ ]